import java.io.*;

public class Test19 {
    public static void main(String[] args) throws IOException {
        String fileName = "D:\\Java\\EnglishTest.txt";

        FileInputStream in = new FileInputStream(fileName);

        int c = in.read();
        int count = 0;

        while (c != -1) {
            if (c == 'a') {
                count++;
            }
            c = in.read();
        }

        System.out.println(count);

        in.close();
    }
}
